<?php


namespace App\Libraries;

use App\Models\Label;
use App\Models\Face;
use App\Models\Renting;
use App\Models\city;
class helpers
{
   public static function labelName($id)
   {
     $label=new Label();
     $labelRows=$label->where('id',$id)->first();
    return $labelRows;
   }
   public static function faceName($id)
   {
       $face=new Face();
       $faceRows=$face->where('id',$id)->first();
       return $faceRows['name'];
   }
   public static function cityName($string){
       $arr=explode(',',$string);
       $city=new city();
       $cityRows="";
       for ($i=0;$i<count($arr);$i++){
           $cityRows.=$city->where('id',$arr[$i])->first()['name'];
       }
       return $cityRows;
   }
}
